package com.itwn.email.consumer.b_workq;

import com.itwn.email.producer.a_simple.QueueConfig;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class SimpleConsumer2 {

    // 自动消费
    @RabbitListener(queues = QueueConfig.SIMPLE_QUEUE)
    public void getMessage(String msg ) {
        System.out.println("消费者2 = " + msg);
    }
}
